/*************************************************************************
 * This file is part of HeroesForge.
 *
 * HeroesForge is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * HeroesForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with HeroesForge.  If not, see <http://www.gnu.org/licenses/>.
 *************************************************************************/
package org.diskordia.heroesforge.core.security;

import java.io.Serializable;
import java.security.Key;
import java.util.Date;

/**
 * Session info containing the data of an authentication session.
 * 
 * @author FSuite
 */
public class SessionInfo implements Serializable{
	private static final long serialVersionUID = -5227347389488044712L;
	
	private Key sessionExchangeKey;
	private Date expiryDate;
	
	protected SessionInfo()
	{
		
	}
	
	protected SessionInfo(Key key, Date expiresOn)
	{
		this.setSessionExchangeKey(key);
		this.setExpiryDate(expiresOn);
	}

	/**
	 * @param sessionExchangeKey the sessionExchangeKey to set
	 */
	protected void setSessionExchangeKey(Key sessionExchangeKey) {
		this.sessionExchangeKey = sessionExchangeKey;
	}

	/**
	 * @param expiryDate the expiryDate to set
	 */
	protected void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	/**
	 * @return
	 */
	public Date getExpiryDate() {
		return this.expiryDate;
	}

	/**
	 * @return
	 */
	public Key getSessionExchangeKey() {
		return this.sessionExchangeKey;
	}
}
